package com.gzx.plugin.tjzy.modular.allocate.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gzx.plugin.tjzy.modular.allocate.entity.GzxAllocateRecord;
import com.gzx.plugin.tjzy.modular.allocate.entity.vo.GzxAllocateCaseExcelVo;
import com.gzx.plugin.tjzy.modular.allocate.entity.vo.GzxAllocateRecordVo;

import java.util.List;

/**
 * @author zjt
 * @description
 * @since 2025/5/21 16:32
 */
public interface GzxAllocateRecordDbService {

    /**
     * 分页查询分案记录
     *
     * @param page               分页参数
     * @param lambdaQueryWrapper 查询条件
     * @return
     */
    Page<GzxAllocateRecordVo> pageList(Page page, LambdaQueryWrapper<GzxAllocateRecord> lambdaQueryWrapper);

    /**
     * 查询分案记录
     *
     * @param lambdaQueryWrapper
     * @return
     */
    List<GzxAllocateRecord> listAll(LambdaQueryWrapper<GzxAllocateRecord> lambdaQueryWrapper);

    /**
     * 根据批次号和债务人卡ID列表查询每组最新记录（按ID降序）
     *
     * @param batchNumber
     * @param debtorCardIdList
     * @return
     */
    List<GzxAllocateRecord> selectLatestRecordsByBatchAndDebtorCards(String batchNumber, List<String> debtorCardIdList);

    /**
     * 批量保存分案记录
     *
     * @param allocateRecordList
     */
    void saveBatch(List<GzxAllocateRecord> allocateRecordList);

    /**
     * 修改逾期金额
     *
     * @param allocateCaseExcelVoList
     */
    void modifyCaseOverdueAmount(List<GzxAllocateCaseExcelVo> allocateCaseExcelVoList);
}
